package designPatterns.xiangyuan;
/**
*@author created by zhanxianbo
*@date 2017年10月31日--上午10:37:47
*/
public class test {
	private  final static String[] colors = { "Red", "Green", "Blue", "White", "Black" };
	      
	public static void main(String[] args) {
		
		for(int i=0; i < 20; ++i) {
	         cicle circle = 
	            (cicle)shapfactory.getcicle(getRandomColor());
	         circle.setX(getRandomX());
	         circle.setY(getRandomX());
	         circle.setRadius(100);
	         circle.draw();
	      }
	}

		private static String getRandomColor() {
	      return colors[(int)(Math.random()*colors.length)];
	   }
		
	   private static int getRandomX() {
	      return (int)(Math.random()*100 );
	   }
	 
	
}


